#ifndef ARRAYTEST_H
#define ARRAYTEST_H

#include <QtCore>
#include <stdio.h>

#include "myarray.h"

namespace sk {

class ArrayTest : public QObject {
    Q_OBJECT

public:
    ArrayTest(QObject *parent = 0) : QObject(parent) {}

public slots:
    void run() {
        printf("Array test started\n");

        MyArray arr;
        for (int i = 0; i < 100; i++) {
            arr.add(i);
        }

        for (int i = 0; i < 100; i++) {
            arr.takeLast();
        }

        printf("size: %d\n", arr.getSize());
        arr.print();

        emit finished();
    }

signals:
    void finished();
};

}

#endif // ARRAYTEST_H
